/********************************************************************************
* Name      : Stephen Durfey													*
* Class     : CS202, MWF 9:30am-10:20am											*
* Instructor: Ron Conway														*
* Class Code: 156																*
* File      : storelist.h														*
*																				*
* This program is designed to handle a simple employee database using a linked  *
* list. Each employee in the database is stored with the following information: *
* Employee Name, Employee ID number, the department the employee works in, and  *
* the amount of Sales the employee has made. The database will be constructed   *
* with the employees being listed in order, according their respective ID       *
* number.																		*
*																				*
* The program has a few various capabilities to handle the employee data.       *
* New employees can be added or deleted, and the database can be printed out    *
* in either its entirety, or by department code.								*
********************************************************************************/


#include <iostream>
#include <string>

using namespace std;

//this class holds all the data for each employee. It has no capabilities
//on its own to modify its own private data. This is done entirely by the
//StoreList class. The only function included in this class, is its default
//constructor. 

class Employee
{
	friend class StoreList;

	private:
		int ID, DeptNum;
		string name;
		double sales;
		Employee* nextEmployee;
	public:
		Employee(string empName = " ", int empID = 0, int dNum = 0, double empSales = 0.0, Employee* nEmp = NULL)
		{
			name = empName;
			ID = empID;
			DeptNum = dNum;
			sales = empSales;
			nextEmployee = nEmp;
		}
};

//This class acts as the anchor for the entire linked list. It is 
//responsible for everything performed on the list, including modifying
//and assigning values to the private data members of the Employee class, 
//which is it a friend of.
		
class StoreList
{
	private:
		Employee* head;
	public:
		StoreList();
		void insertNode(Employee* &passedPtr);
		void deleteNode(int empID);
		void printList();
		void printDept(int dNum);
		~StoreList();
};